/*
 *  This file is part of LifeBudget - Copyright 2010 Clifton Eaton
 *  ------------------------------------------------------------------
 *  LifeBudget is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  LifeBudget is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with LifeBudget.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.lifebudget.app.client.mvc.model;

import java.io.Serializable;


/**
 * CategoryTotal is used by the Overview functionality of LifeBudget
 * to capture a Category and it's associated total after all Transactions 
 * have been applied. 
 * 
 * Serves as model object to the view as well as a Data Transfer Object and 
 * therefore, meant to be used only in the client code or for communicating 
 * to through GWT RPC.
 */
public class CategoryTotal implements Serializable {
	
	/** The category. */
	private Category category;
	
	/** The total. */
	private double total;

	/**
	 * Instantiates a new category total.
	 */
	public CategoryTotal() {
		super();
	}

	/**
	 * Instantiates a new category total.
	 *
	 * @param category the category
	 * @param total the total
	 */
	public CategoryTotal(Category category, double total) {
		super();
		this.category = category;
		this.total = total;
	}

	/**
	 * Sets the category.
	 *
	 * @param category the new category
	 */
	public void setCategory(Category category) {
		this.category = category;
	}

	/**
	 * Gets the category.
	 *
	 * @return the category
	 */
	public Category getCategory() {
		return category;
	}

	/**
	 * Sets the total.
	 *
	 * @param total the new total
	 */
	public void setTotal(double total) {
		this.total = total;
	}

	/**
	 * Gets the total.
	 *
	 * @return the total
	 */
	public double getTotal() {
		return total;
	}

}
